<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>背景位置-精确单位</title>
    <style>
      div {
        width: 300px;
        height: 300px;
        background-color: pink;
        background-image: url(images/logo.png);
        background-repeat: no-repeat;
        /* 设置精确单位：20px 50px; x轴一定是20  y轴一定是50 */
        /* background-position: 20px 50px; */
        /* background-position: 50px 20px; */

        /* 设置精确单位：20px，第二参数省略，x轴一定是20，y轴垂直居中 */
        background-position: 20px;
      }
    </style>
  </head>

  <body>
    <div></div>
  </body>
</html>
